<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * @author Меркулов Илья aka Bit0reZ
 * @license GNU GPLv2
 */

class ExampleTwo {

	var $data = array();
	var $ci;
	var $name = 'ExampleTwo';

        function __construct()
	{
                $this->ci = &get_instance();

	}

	function init($param)
	{
                $this->data['base_url'] = @$this->ci->base_url;
		$this->data['container'] = @$param;
	}

	function data()
	{
                //$dt['runned'] = array( 'subj' => 'test' );

		if(!$dt['runned']) $dt['message'] = array('text' => "На данный момент вебинаров не проводится.");
		else $dt += array('message' => array());
		return json_encode($dt);
	}

	function load()
	{
		$data['base_url'] = base_url();
		$data['container'] = @$this->data['container'];
		$gadget = $this->ci->parser->parse('gadgets/Example/'.$this->name.'.html', $data, true);
		return $gadget;
	}
}
